package com.matt.repository.course;

import com.matt.domain.course.CoursePlanTopic;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Date;
import java.util.List;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2018/3/13
 * *******************************
 */
public interface CoursePlanTopicRepository extends JpaRepository<CoursePlanTopic, String>{
    List<CoursePlanTopic> findByTopicIdOrderByCourseDateAsc(String topicId);
    List<CoursePlanTopic> findByTopicIdAndCourseDateBetween(String topicId, Date begin, Date end);
    List<CoursePlanTopic> findByTopicIdAndCourseDate(String topicId, Date courseDate);
    List<CoursePlanTopic> findByCourseDate(Date courseDate);
    List<CoursePlanTopic> findByCourseId(String courseId);
    List<CoursePlanTopic> findByTopicIdAndCourseDateAfter(String topicId, Date courseDate);
}
